import website  from '@/framework-core/config/website';
import {validateRules} from "@/framework-core/utils/validateRule";

export const tableOption = {
    "border": true,
    "index": true,
    "indexLabel": "#",
    "stripe": true,
    "menuAlign": "center",
    "align": "center",
    "searchMenuSpan": 6,
    searchEnter: true,
    selection: true,
    grid: window.isMobile,
    gridSpan: 24,
    menuWidth: 340,
    "column": [


        {
            type: 'userChoose',
            component: 'userChoose',
            label: '发送者',
            prop: 'senderId',
            "rules": [{
                required: true,
                message: '发送者不能为空',
                trigger: 'blur'
            }],
            hide:true,
            span: 12,
        },

        {
            "type": "input",
            "label": "发送者",
            "display":false,
            "prop": "senderName",
        },

        {
            type: 'userChoose',
            component: 'userChoose',
            label: '接收者',
            hide:true,
            prop: 'receiverId',
            "rules": [{
                required: true,
                message: '接收者不能为空',
                trigger: 'blur'
            }],
            span: 12,
        }
        ,
        {
            "type": "input",
            "label": "接收者",
            "display":false,
            "prop": "receiverName",
        },
        {
            "type": "input",
            "label": "任务标题",
            "prop": "title",
            "overHidden": false,
            "rules": [{
                required: true,
                message: '任务标题不能为空',
                trigger: 'blur'
            }],
            'search': true,
            "span": 24
        }

        ,
        {
            "type": "textarea",
            "label": "任务内容",
            "prop": "content",
            "overHidden": false,
            "rules": [{
                required: true,
                message: '任务内容不能为空',
                trigger: 'blur'
            }],
            'search': true,
            "span": 24
        }
        ,

        {
            type: 'userChoose',
            component: 'userChoose',
            label: '协助人',
            hide:true,
            prop: 'exterId',
            span: 12,
        }
        ,
        {
            "type": "input",
            "label": "协助人",
            "display":false,
            "prop": "exterName",
        },
        {
            "type": "input",
            "label": "进度",
            "prop": "schedule",
            "overHidden": false,
            "rules": [{
                required: true,
                message: '进度不能为空',
                trigger: 'blur'
            }],
            'search': true,
            "span": 12
        }

        ,
        {
            "type": "input",
            "label": "进度状态",
            "prop": "scheduleStatus",
            "overHidden": false,
            "rules": [{
                required: true,
                message: '进度状态不能为空',
                trigger: 'blur'
            }],
            'search': true,
            "span": 12
        }

        ,
        {
            "type": "date",
            "label": "截止时间",
            "prop": "finishTime",
            "overHidden": false,
            format: 'YYYY-MM-DD HH:mm:ss',
            valueFormat: 'YYYY-MM-DD HH:mm:ss',
            "rules": [{
                required: true,
                message: '截止时间不能为空',
                trigger: 'blur'
            }],
            'search': true,
            "span": 12
        },
        {
            "type": "ueditor",
            "label": "备注",
            "prop": "remark",
            "overHidden": true,

            // 指定插件类型为在线编辑器
            "component": 'avueUeditor',
            // 上传路径
            "action": website.baseUrl + "/api/sys/file/upload",
            "propsHttp": {
                // 上传完成返回的json的root
                "res": "data.data",
                // 上传完成返回的图片路径
                "url": "url",
                // 上传文件名，默认file
                "fileName": "file",
            },


            "rules": [{
                required: false,
                message: '备注不能为空',
                trigger: 'blur'
            }],
            'search': false,
            "span": 24
        }
    ]
}
